package database

import (
	"fmt"

	"github.com/astaxie/beego/orm"
	_ "github.com/mattn/go-sqlite3"
)

func init() {
	fmt.Println("初始化 数据库")
	orm.RegisterDriver("sqlite3", orm.DRSqlite)
	orm.RegisterDataBase("default", "sqlite3", "./db/database/station.db")
	orm.RegisterModel(new(User), new(Device))
	orm.RunSyncdb("default", false, true)
}
